package com.fuxi.cloud.desreport.dao;

import com.fuxi.cloud.desreport.entity.JmReportDbParam;
import org.jeecgframework.minidao.annotation.Param;
import org.jeecgframework.minidao.annotation.ResultType;
import org.jeecgframework.minidao.annotation.Sql;
import org.jeecgframework.minidao.pojo.MiniDaoPage;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * JimuReportDbParamDao
 *
 * @Author: 扫地僧
 * @CreateTime: 2021-05-03
 */
@Repository
public interface JimuReportDbParamDao {
    @Sql("SELECT * FROM jimu_report_db_param WHERE ID = :id")
    JmReportDbParam get(@Param("id") String var1);

    int update(@Param("jimuReportDbParam") JmReportDbParam var1);

    void insert(@Param("jimuReportDbParam") JmReportDbParam var1);

    @ResultType(JmReportDbParam.class)
    MiniDaoPage<JmReportDbParam> getAll(@Param("jimuReportDbParam") JmReportDbParam var1, @Param("page") int var2, @Param("rows") int var3);

    @Sql("DELETE from jimu_report_db_param WHERE ID = :id")
    void delete(@Param("id") String var1);

    @Sql("DELETE FROM jimu_report_db_param WHERE ID = :id")
    void deleteById(@Param("id") String var1);

    @Sql("DELETE FROM jimu_report_db_param WHERE ID IN(:ids)")
    void deleteBatchIds(@Param("ids") List<String> var1);

    @Sql("SELECT * FROM jimu_report_db_param WHERE JIMU_REPORT_HEAD_ID = :jimuReportHeadId ORDER BY order_num ASC")
    List<JmReportDbParam> list(@Param("jimuReportHeadId") String var1);

    @Sql("DELETE  FROM jimu_report_db_param WHERE JIMU_REPORT_HEAD_ID = :reportId")
    void deleteByReportId(@Param("reportId") String var1);
}

